- Home
- Course Category
- Course Result
- Course Detail
Hot Line: 0124-2383121
Course Introduction
Includes
Certificate & Practice Material
Programs for practice
In the program below, we've introduced beginers to programming in C
Source Code: Program to swap 2 numbers using function(Call by Reference)
# Program to implement call by reference in C
#include<stdio.h>
void swap(int &c,int &d)
{
int e;
e=c;
c=d;
d=e;
}
void main()
{
int a=5,b=4;
swap(a,b);
printf("values of a and b are:%d %d",a,b);
}
Output
Run the program to see the OUTPUT